<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .news {
            background-color: gray;
            border: solid 1px black;
            /* float: left; */
            width: 10%;
            height: 10%;
        }

        .news img {
            float: left;
        }

        .news p {
            float: right;
            color:chartreuse;
        }

        .A {
            background-color: black;
            float：right: ;
            color: white;
        }

        .B {
            background-color: yellow;
        }
    </style>
</head>

<body>
    <div class="news">
        <img src="news-pic.jpg" />
        <p>some text</p>
    </div>
    <div class=A>
        这是A。
    </div>
    <div class=B>
        这是B。
    </div>

</body>

</html>